const {
  Mysql,
  addSql,
  xiuSql,
  remSql,
  execute,
  paraphrase,
} = require("../../db/db");
// 返回首页数据
let homeData = async (ctx, next) => {
  // let res = await Mysql("classfiy");
  console.log("董贞请求成功");
  ctx.body = {
    msg: "请求成功",
    code: "01",
    data: {
      banners: await Mysql("home_banner"),
      xianshi: await Mysql("home"),
      sexilie: await Mysql("home_c"),
      xinpin: await Mysql("home_a"),
      xihuan: await Mysql("home_b"),
    },
  };

  await next();
};

module.exports = {
  homeData,
};
